package com.konne.nightmare.FastPublicOpinion.ui.information.fragment;

import android.os.Bundle;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpFragment;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.ui.information.adapter.ClassFourAdapter;
import com.konne.nightmare.FastPublicOpinion.ui.information.adapter.ClassTwoAdapter;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * @Author: chen
 * @UpdateDate: 1/25/22
 * @UpdateRemark:
 */
public class ClassFourFragment extends BaseMvpFragment {
    @BindView(R.id.rcl_list)
    RecyclerView rclList;
    ClassFourAdapter classFourAdapter ;
    List<String> list = new ArrayList<>();

    @Override
    protected BaseMvpPresenter createPresenter() {
        return new BaseMvpPresenter();
    }



    @Override
    public int getLayout() {
        return R.layout.fragment_class_two;
    }

    @Override
    public void initView() {
        list.add("1");
        list.add("2");
        list.add("3");
        list.add("4");
        classFourAdapter = new ClassFourAdapter(R.layout.item_class_two,list);
        rclList.setLayoutManager(new LinearLayoutManager(getActivity()));
        rclList.setAdapter(classFourAdapter);
        rclList.setNestedScrollingEnabled(false);
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }


    @Override
    public LoadProgressDialog getLoadDialog() {
        return dialog;
    }

    @Override
    public void cancelLoadDialog() {
        if (dialog != null && dialog.isShowing()) {
            dialog.dismiss();
        }
    }
}
